from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError


# 审批流模板类
class WorkflowTemplate(models.Model):
    _inherit = 'sb.workflow.template'

    workflow_type = fields.Selection(selection_add=[
        ('sale', 'Sale'),
        ('account', 'Account'),
    ], ondelete={'activity': 'cascade'})


class WorkflowTemplateItem(models.Model):
    _inherit = 'sb.workflow.template.item'

    is_jmi_upload = fields.Boolean(string="JMI Upload Sale")
    is_engineering = fields.Boolean(string="Is Engineering")
